// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*!
 * @file SDPltStateMsg.cpp
 * This source file contains the definition of the described types in the IDL file.
 *
 * This file was generated by the tool gen.
 */

#ifdef _WIN32
// Remove linker warning LNK4221 on Visual Studio
namespace {
char dummy;
}  // namespace
#endif  // _WIN32

#include "SDPltStateMsg.h"
#include <fastcdr/Cdr.h>

#include <fastcdr/exceptions/BadParamException.h>
using namespace eprosima::fastcdr::exception;

#include <utility>

SDPltStateMsg::SDPltStateMsg()
{
    // m_data_ com.eprosima.idl.parser.typecode.PrimitiveTypeCode@b3d7190
    m_data_ = 0;

}

SDPltStateMsg::~SDPltStateMsg()
{
}

SDPltStateMsg::SDPltStateMsg(
        const SDPltStateMsg& x)
{
    m_data_ = x.m_data_;
}

SDPltStateMsg::SDPltStateMsg(
        SDPltStateMsg&& x)
{
    m_data_ = x.m_data_;
}

SDPltStateMsg& SDPltStateMsg::operator =(
        const SDPltStateMsg& x)
{

    m_data_ = x.m_data_;

    return *this;
}

SDPltStateMsg& SDPltStateMsg::operator =(
        SDPltStateMsg&& x)
{

    m_data_ = x.m_data_;

    return *this;
}

size_t SDPltStateMsg::getMaxCdrSerializedSize(
        size_t current_alignment)
{
    size_t initial_alignment = current_alignment;


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    return current_alignment - initial_alignment;
}

size_t SDPltStateMsg::getCdrSerializedSize(
        const SDPltStateMsg& data,
        size_t current_alignment)
{
    (void)data;
    size_t initial_alignment = current_alignment;


    current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);


    return current_alignment - initial_alignment;
}

void SDPltStateMsg::serialize(
        eprosima::fastcdr::Cdr& scdr) const
{

    scdr << m_data_;

}

void SDPltStateMsg::deserialize(
        eprosima::fastcdr::Cdr& dcdr)
{

    dcdr >> m_data_;
}

/*!
 * @brief This function sets a value in member data_
 * @param _data_ New value for member data_
 */
void SDPltStateMsg::data_(
        uint64_t _data_)
{
    m_data_ = _data_;
}

/*!
 * @brief This function returns the value of member data_
 * @return Value of member data_
 */
uint64_t SDPltStateMsg::data_() const
{
    return m_data_;
}

/*!
 * @brief This function returns a reference to member data_
 * @return Reference to member data_
 */
uint64_t& SDPltStateMsg::data_()
{
    return m_data_;
}


size_t SDPltStateMsg::getKeyMaxCdrSerializedSize(
        size_t current_alignment)
{
    size_t current_align = current_alignment;



    return current_align;
}

bool SDPltStateMsg::isKeyDefined()
{
    return false;
}

void SDPltStateMsg::serializeKey(
        eprosima::fastcdr::Cdr& scdr) const
{
    (void) scdr;
     
}
